﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Management;
using System.Collections.Specialized;
using System.Collections;

namespace KgUtils.HealthMonitoring
{
    public class InfoWebEvent : WebRequestEvent
    {
        protected StringDictionary details = new StringDictionary();
        public StringDictionary Details
        {
            get { return details; }
            set { details = value; }
        }

        public InfoWebEvent(string message, object eventSource)
            : base(message, eventSource, WebEventCodes.WebExtendedBase + 9000)
        {
        }

        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
            base.FormatCustomEventDetails(formatter);
            formatter.AppendLine("");
            foreach (DictionaryEntry item in Details)
                formatter.AppendLine(String.Concat(item.Key, " : ", item.Value));
        }
    }
}
